Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Graphics /
Chapter 3 - Geometric Styles / Geometric Styles Reference
Functions / Getting and Setting Dashes


GXGetShapeDash

You can use the GXGetShapeDash function to retrieve the dash information from the style object associated with a particular shape.

gxDashRecord *GXGetShapeDash(gxShape source, gxDashRecord *dash);
source
A reference to the shape whose dash information you want to retrieve.
dash
A pointer to a gxDashRecord structure. On return, this structure contains the dash information for the source shape.
function result
A copy of the gxDashRecord structure associated with the source
shape's style object.
DESCRIPTION
The GXGetShapeDash function returns as its function result and in the dash parameter, a pointer to a gxDashRecord structure containing the dash information for the style object of the shape specified by the source parameter.

This function creates a new shape to encapsulate the dash geometry, and places a reference to this shape in the dash field of the returned gxDashRecord structure. You should dispose of this shape when you no longer need it.

Since this function copies the dash information from the source shape's style, you may make changes to the gxDashRecord structure returned by this function without affecting the source shape's dashes. If you want to change the dash information for the source shape, you must use the GXSetShapeDash function.

SPECIAL CONSIDERATIONS
Unless an error results, the GXGetShapeDash function creates a shape; you are responsible for disposing of this shape when you no longer need it. See Inside Macintosh: QuickDraw GX Objects for information about disposing of objects.

ERRORS, WARNINGS, AND NOTICES
Errors
out_of_memory
shape_is_nil
parameter_is_nil
SEE ALSO
For a discussion of dashes, see "Dashes" on page 3-27.

For examples of adding dashes to shapes, see page 3-66 through page 3-86.

For a discussion of the gxDashRecord structure and a description of what types of shapes you can use as dash shapes, see "The Dash Structure" on page 3-103.

To retrieve dash information from a style object, use the GXGetStyleDash function, which is described on page 3-135.

To specify dash information for a style object, use the GXSetStyleDash function, which is described on page 3-136.

To specify dash information for a style object associated with a particular shape, use the GXSetShapeDash function, which is described in the next section.

To determine where dashing occurs for a particular shape, use the GXGetShapeDashPositions function, which is described on page 3-140.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996